home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2006 May / PCWMAY06.iso / Software / Freeware / First Page 2006 3.00 / fp2006-final-3.00-setup.exe / {app} / Iscripts / Windows & Frames / pop-under.izs < prev    next >
Text File  |  2005-07-29  |  3KB  |  130 lines

  1. <!NOWIZARD>
  2.  
  3. <!TITLE>Pop-under window
  4. <!/TITLE>
  5.  
  6. <!DESCRIPTION>Pop-under windows are becoming increasing popular as a less intrusive alternative to popup windows. Use this script to add a pop-under window to your page; simply input the page/address to pop under, and off you go!
  7. <!/DESCRIPTION> 
  8.  
  9. <!CATEGORY>windows, remotes, frames<!/CATEGORY>
  10.  
  11. <!SCRIPT>
  12. <!-- START OF SCRIPT -->
  13. <script>
  14.  
  15. //specify page to pop-under
  16. var popunder="http://yahoo.com"
  17.  
  18. //specify popunder window features
  19. //set 1 to enable a particular feature, 0 to disable
  20. var winfeatures="width=800,height=510,scrollbars=1,resizable=1,toolbar=1,location=1,menubar=1,status=1,directories=0"
  21.  
  22. //Pop-under only once per browser session? (0=no, 1=yes)
  23. //Specifying 0 will cause popunder to load every time page is loaded
  24. var once_per_session=0
  25.  
  26. ///No editing beyond here required/////
  27.  
  28. function get_cookie(Name) {
  29.   var search = Name + "="
  30.   var returnvalue = "";
  31.   if (document.cookie.length > 0) {
  32.     offset = document.cookie.indexOf(search)
  33.     if (offset != -1) { // if cookie exists
  34.       offset += search.length
  35.       // set index of beginning of value
  36.       end = document.cookie.indexOf(";", offset);
  37.       // set index of end of cookie value
  38.       if (end == -1)
  39.          end = document.cookie.length;
  40.       returnvalue=unescape(document.cookie.substring(offset, end))
  41.       }
  42.    }
  43.   return returnvalue;
  44. }
  45.  
  46. function loadornot(){
  47. if (get_cookie('popunder')==''){
  48. loadpopunder()
  49. document.cookie="popunder=yes"
  50. }
  51. }
  52.  
  53. function loadpopunder(){
  54. win2=window.open(popunder,"",winfeatures)
  55. win2.blur()
  56. window.focus()
  57. }
  58.  
  59. if (once_per_session==0)
  60. loadpopunder()
  61. else
  62. loadornot()
  63.  
  64. </script>
  65.  
  66.  
  67. <!-- END OF SCRIPT -->
  68. <!/SCRIPT>
  69.  
  70. <!PREVIEW>
  71. <!-- START OF SCRIPT -->
  72. <script>
  73.  
  74. //specify page to pop-under
  75. var popunder="http://yahoo.com"
  76.  
  77. //specify popunder window features
  78. //set 1 to enable a particular feature, 0 to disable
  79. var winfeatures="width=800,height=510,scrollbars=1,resizable=1,toolbar=1,location=1,menubar=1,status=1,directories=0"
  80.  
  81. //Pop-under only once per browser session? (0=no, 1=yes)
  82. //Specifying 0 will cause popunder to load every time page is loaded
  83. var once_per_session=0
  84.  
  85. ///No editing beyond here required/////
  86.  
  87. function get_cookie(Name) {
  88.   var search = Name + "="
  89.   var returnvalue = "";
  90.   if (document.cookie.length > 0) {
  91.     offset = document.cookie.indexOf(search)
  92.     if (offset != -1) { // if cookie exists
  93.       offset += search.length
  94.       // set index of beginning of value
  95.       end = document.cookie.indexOf(";", offset);
  96.       // set index of end of cookie value
  97.       if (end == -1)
  98.          end = document.cookie.length;
  99.       returnvalue=unescape(document.cookie.substring(offset, end))
  100.       }
  101.    }
  102.   return returnvalue;
  103. }
  104.  
  105. function loadornot(){
  106. if (get_cookie('popunder')==''){
  107. loadpopunder()
  108. document.cookie="popunder=yes"
  109. }
  110. }
  111.  
  112. function loadpopunder(){
  113. win2=window.open(popunder,"",winfeatures)
  114. win2.blur()
  115. window.focus()
  116. }
  117.  
  118. if (once_per_session==0)
  119. loadpopunder()
  120. else
  121. loadornot()
  122.  
  123. </script>
  124.  
  125.  
  126.  
  127. <!-- END OF SCRIPT -->
  128. <!/PREVIEW>
  129.  
  130. <!RELATED>NONE<!/RELATED>